<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<link href="../edit68k.css" rel="stylesheet" type="text/css">
<title>Hardware</title>
</head>

<body class="text">
<p class="heading">Sim68K - Hardware Window<hr noshade></p>
<p></p>
<p>Sim68K includes support for hardware simulation. To view the 
Hardware window, select 'Hardware' from the View menu.</p>
<p>
<img border="0" src="IMAGES/Hardware/ViewHardwareMenu.GIF" width="119" height="110"></p>
<p>&nbsp;</p>
<p>
<img border="0" src="IMAGES/Hardware/hardware.png" width="428" height="527"></p>
<p>The hardware window displays an 8 digit 7-segment display, a bank 
of 8 light emitting diodes (LED), a bank of 8 toggle switches and a bank of 8 
push button switches. Each of these hardware items 
may be mapped to any valid 68000 address by entering the desired address in the 
corresponding <b>Address:</b> field. If the address entered causes a conflict 
with another device the color of the address text will change to
<font color="#FF0000">red</font>.</p>
<p>The 7-segment display has each digit mapped to a successive word 
address beginning with the left-most digit. For example, in the above picture 
the digits are mapped to memory as follows:</p>
<p class="text2"><u>&nbsp; DIGIT&nbsp;&nbsp;&nbsp;ADDRESS<br>
</u>&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E00000<br>
&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E00002<br>
&nbsp;&nbsp;&nbsp; 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E00004<br>
&nbsp;&nbsp;&nbsp; 4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E00006<br>
&nbsp;&nbsp;&nbsp; 5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E00008<br>
&nbsp;&nbsp;&nbsp; 6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E0000A<br>
&nbsp;&nbsp;&nbsp; 7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E0000C<br>
&nbsp;&nbsp;&nbsp; 8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E0000E</p>
<p>The toggle switches write a 1 to the corresponding bit in memory 
when the switch is on &quot;Up&quot; and write a 0 when the switch is off &quot;Down&quot;.</p>
<p>The push button switches are normally high. They write a 0 to 
the corresponding bit in memory while the switch is pressed and write a 1 when 
the switch is released.</p><hr>
<p><font color="#FFFFFF"><b><span style="background-color: #800000">&nbsp;Interrupt
</span></b></font> </p>
<p>The Interrupt pushbuttons 
may be used to manually simulate an interrupt request. Pressing each button 
generates the corresponding interrupt request. For more on exception processing 
see <a href="SimOptions.htm">Enable Exceptions</a> under Simulator Options and
<a href="Exceptions.htm">exception processing</a>.</p>
<p>An interrupt may be 
set to automatically create interrupts by selecting the desired interrupt in the 
&quot;Auto Interval&quot; drop down and then entering the interval in milliseconds. 
Checking the checkbox under the interrupt pushbutton enables auto interrupts for 
the corresponding interrupt. </p>
<p>The Reset pushbutton simulates a hardware reset.</p>
<hr>
<p><font color="#FFFFFF"><b><span style="background-color: #808080">&nbsp;Memory 
Map </span></b></font></p>
<p>A 68000 microprocessor contains 32 bit registers but externally it only 
supports a 24bit memory space from $00000000 through $00FFFFFF. Any attempt to 
access memory beyond $00FFFFFF results in the upper 8 bits of the address being 
ignored. Therefore, attempting to access memory location $nn002000, where nn is 
$01 through $FF, actually results in an access to $00002000. EASy68K emulates 
this behavior.</p>
<p>Six different types of memory access are supported by EASy68K, they are: RAM, 
Hardware, ROM, Read, Protected and Invalid. RAM is assumed unless otherwise 
specified. The memory types:</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; RAM - Read and Write<br>
&nbsp;&nbsp;&nbsp;&nbsp; Hardware - Any of the simulated hardware devices from 
the Hardware window above.<br>
&nbsp;&nbsp;&nbsp;&nbsp; ROM - Read Only Memory, Writes are ignored.<br>
&nbsp;&nbsp;&nbsp;&nbsp; Read - Read only, Writes result in a
<a href="Exceptions.htm">Bus error</a>.<br>
&nbsp;&nbsp;&nbsp;&nbsp; Protected - Read and Write only if the Supervisor bit 
in the Status Register is set, otherwise a <a href="Exceptions.htm">Bus error</a> 
results.<br>
&nbsp;&nbsp;&nbsp;&nbsp; Invalid - Any access results in a
<a href="Exceptions.htm">Bus error</a>.</p>
<p>The checkbox is used to enable/disable the corresponding memory type.</p>
<p>The simulator checks the memory map access in the following order: Hardware, 
Invalid, Protected, Read, ROM. Hardware accesses are always allowed.</p>
<p>The <a href="../Directives/memory.htm">Memory</a> assembler directive may be 
used to specify memory types in source code. </p><hr>
<p><a href="../simio.htm">Trap task 32</a> may be used to interact with the 
simulated hardware from a program.</p>
<p>* All Addresses are entered in hexadecimal,&nbsp; the Auto Interrupt timer  
is a decimal value.</p>

</body>

</html>
